home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.07.25.10.55.26; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.20.09.44.34; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Lint.
- @
- text
- @/*
- * Copyright (c) 1983 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
- #if defined(LIBC_SCCS) && !defined(lint)
- static char sccsid[] = "@@(#)inet_ntoa.c 5.3 (Berkeley) 3/7/88";
- #endif /* LIBC_SCCS and not lint */
-
- /*
- * Convert network-format internet address
- * to base 256 d.d.d.d representation.
- */
-
- #include <stdio.h>
- #include <sys/types.h>
- #include <netinet/in.h>
-
- char *
- inet_ntoa(in)
- struct in_addr in;
- {
- static char b[18];
- register char *p;
-
- p = (char *)∈
- #define UC(b) (((int)b)&0xff)
- sprintf(b, "%d.%d.%d.%d", UC(p[0]), UC(p[1]), UC(p[2]), UC(p[3]));
- return (b);
- }
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d21 2
- @
-